package com.zzy.mccjt.service.controller;

import com.zzy.mccjt.interfaces.system.MccjtAppSystemLoginInterface;
import com.zzy.mccjt.pojo.common.CurrentUser;
import com.zzy.mccjt.service.common.framework.response.WebApiResponse;
import com.zzy.mccjt.service.common.model.Result;
import com.zzy.mccjt.service.common.util.UserUtils;
import com.zzy.mccjt.service.service.LoginService;
import com.zzy.pojo.system.login.UserDTO;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@Api(value = "登录相关")
@RestController
@Slf4j
public class LoginController  implements MccjtAppSystemLoginInterface {

    private final static String ERROR_PATH = "/error";


    @Autowired
    private LoginService loginService;

    @Override
    public WebApiResponse<String> login(@Valid UserDTO u) {
        return loginService.logIn(u);
    }

    @Override
    public WebApiResponse<String> regist(@Valid UserDTO u) {
        return null;
    }
}
